package com.example.myretrofit2.service;

import com.example.myretrofit2.Car;
import com.example.myretrofit2.httpResult.HttpResult;

import java.util.List;

import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

public interface CarService {
    @GET("/car/queryCar")
    Observable<HttpResult<List<Car>>> queryCar();
    @POST("/car/insertCar")
    Observable<HttpResult<Boolean>> insertCar(@Body Car car);
    @POST("/car/updateCar")
    Observable<HttpResult<Boolean>> updateCar(@Body Car car);
    @GET("/car/delCar")
    Observable<HttpResult<Boolean>> delCar(@Query("id") int id );
}
